# encoding  :  utf-8 _*_
# @author   :  朱清闯
# @software :  PyCharm
# time      :  2022/3/22 16:52
from account.models import User


# 如该username已经注册过了返回False，未注册返回True
def verify(username):
    has_registered = True
    user = User.objects.filter(username=username)
    if len(user) >=1:
        has_registered = False
    return has_registered


